%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% REPLICATION MATERIALS:                                                                     %%
%% Partisan Alignment Increases Voter Turnout: Evidence from Redistricting                    %%
%% BY Bernard Fraga, Daniel Moskowitz and Benjamin Schneer                                    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TABLE OF CONTENTS: DATA SETS %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

analysis_file_2pct_2016.dta -- National Voter File Data (Note: This is a proprietary file based on data from Catalist, LLC that we cannot post publicly)
CCES_Panel_Full3waves_VV_V3.dta -- CCES Panel Data
district_turnout_characteristics.dta -- District Level Characteristics
estimates.RData -- Estimates from Fraga, Moskowitz and Schneer derived using the National Voter File Data. Though analysis_file_2pct_2016.dta cannot be posted, we hold the estimates based on using that file so we can provide working replication code that subsequently uses those estimates.
st_abbrev_fips.dta -- State Abbreviations

%%%%%%%%%%%%%%%%%%%%%%
% DATA SET CITATIONS %
%%%%%%%%%%%%%%%%%%%%%%

Schaffner, Brian; Ansolabehere, Stephen, 2015, "CCES_Panel_Full3waves_VV_V3.dta", 2010-2014 Cooperative Congressional Election Study Panel Survey, https://doi.org/10.7910/DVN/TOE8I1/HEKRH9, Harvard Dataverse, V9, 


%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TABLE OF CONTENTS: CODE %
%%%%%%%%%%%%%%%%%%%%%%%%%%%

cces_regressions.do -- Prepare CCES Data and perform analysis from part of paper using CCES data
cces_figures.R -- Constructs Figures in paper using data processed and then saved in "cces_regressions.do"
partisanship_regressions.do -- Analyzes national voter file data for main specifications testing effects of partisan alignment on turnout
format_table_2.R -- Creates summary table of results based on output from "partisanship_regressions.do"


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INSTRUCTIONS FOR REPLICATION %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

-Unzip folder
-Set paths in stata code and R code to correct directory locations
-Create "out" folder to hold output
-Execute program files in following order:
   1) cces_regressions.do
   2) cces_figures.R
   3) format_table_2.R
-Note that the file "partisanship_regressions.do" will not run without the individual level voter data

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BASE SOFTWARE DEPENDENCIES %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

-Stata 15
-R 3.4
